<script setup>
import { computed, defineProps } from "vue";
import utils from "./utils.js";
import comps from "./utils_input.js"
const { meta, vm } = defineProps(["meta", "vm"]);
const modelName = meta.model || "~";
const model = vm.getModel(modelName);
const childs = computed(() => {
  return utils.ctl_items(vm, meta);
});

</script>
<template>
  <el-form v-model="model" label-width="auto">
    <el-form-item v-for="item in childs" :label="item.title">
      <!-- <el-input v-model="model.data[item.name]" /> -->
      <component :is="comps(item)" :vm="vm" :meta="item" />
    </el-form-item>
  </el-form>
</template>